{% extends "base.html" %}

{% block titulo %} Noticias de {{course.name}}{% endblock %}
{%block style%}<link rel="stylesheet" type="text/css" href="/stylesheets/newsStyle.css" />{%endblock%}


{% block breadcrumbs %}
        {%if course and group%}
                        <div id="middleBreadcrumb">
                            <a href="/home/">home</a> >
                       </div>
                        <div id="middleBreadcrumb">
                            <a href="/course/{{course.code}}/{{group.code}}/">{{course.name}}</a> >
                        </div>
                        <div id="lastBreadcrumb">
                            Noticias
                        </div>
        {%else%}
                <a href="/home/">home</a> >
                        <div id="lastBreadcrumb">
                            Noticias
                        </div>
        {%endif%}
{% endblock %}

{% block cuerpo %}
{%if newsList%}
        {%if isTeacher and course and group%}
            <div id="newsMenuInfo">&iquest;Desea <a href="/createNews/{{course.code}}/{{group.code}}/">publicar otra noticia</a>?</div>
            <br />
        {%endif%}
        {% for news in newsList %}
            <div id="newsBox">
            <div id="newsTitle">{{news.title}}</div>
            <div id="newsDate">{{news.date}}</div>
            <div id="newsContent">
                <pre id="newsPreformat">{{news.content}}</pre>
            </div>
            <hr />
            </div>
        {% endfor %}
 {%else%}
    <div id="newsMenuInfo">No hay noticias disponibles para este grupo.
    {%if isTeacher and course and group%}
        &iquest;Desea <a href="/createNews/{{course.code}}/{{group.code}}/">publicar una noticia</a>?
        <br />
    {%endif%}
    </div>
{%endif%}
{%if course and group%}
<div id="rssNews">
    <a href="/feeds/news/{{course.code}}/{{group.code}}/" class="feed">RSS de las noticias de este curso</a>
</div>
{%endif%}
{% endblock %}